


var mongoose = require("mongoose");
var {Schema,model} = mongoose;



var user_schema = new Schema({
    username:String,
    password:String,
    mobile:String,
    confirm_password:String,
    age:Number,
    word:String,
    address:String,
    time:Date
})


exports.UserModel = model("users",user_schema)


var vuser_schema = new Schema({
    username:String,
    password:String,
    phone:String,
    confirm_password:String,
    age:Number,
    word:String,
    address:String,
    time:Date,
    avatar:String,
    birthday:String,
})


exports.VueModel = model("vusers",vuser_schema)


var movie_schema = new Schema({
    "genres": Array,
    "casts": Array,
    "directors": Array,
    "rating": Object,
    "title":String,
    "collect_count": Number,
    "original_title":String,
    "subtype": String,
    "year":String,
    "images": Object,
    "alt": String,
    "id": String
})

exports.MvModel = model('movies',movie_schema)


//评论
var comment_schema = new Schema({
    title:String,
    content:String,
    time:Date,
    username:String,
    cid:String,
    movie:Object
})

exports.Comment = model('comments',comment_schema)
